﻿<UserControl x:Class="daigou.main.XamlResources.TestingUserControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:l="clr-namespace:daigou.modules.Bill;assembly=daigou.modules"
             mc:Ignorable="d" 
             d:DesignHeight="110" d:DesignWidth="1200">
    <Border BorderThickness="1" BorderBrush="DarkBlue" Margin="0" Padding="0">
        <Grid  Margin="10" Background="#AAD3E1E8" Grid.ShowGridLines="True">
            <Grid.Resources>
                <Style TargetType="TextBlock">
                    <Setter Property="Background" Value="{x:Null}" />
                    <Setter Property="Padding" Value="3"/>
                </Style>
            </Grid.Resources>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="90" />
                <ColumnDefinition Width="250" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="200" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="*" />
                <RowDefinition Height="*" />
                <RowDefinition Height="*" />
                <RowDefinition Height="*" />
                
            </Grid.RowDefinitions>

   

            <Image Grid.Column="0" Grid.RowSpan="5" x:Name="imgPhoto"   Source="{Binding DomainProduct.Photo, Converter={StaticResource PathToImageConverter}}"    HorizontalAlignment="Stretch" Margin="0"  StretchDirection="Both"  VerticalAlignment="Stretch" />

            <TextBlock Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" FontWeight="Black"  HorizontalAlignment="Stretch"   VerticalAlignment="Stretch" Text="{Binding DomainProduct.Code}" />
            <TextBlock Grid.Column="1" Grid.Row="2" Grid.RowSpan="2"  FontSize="10" HorizontalAlignment="Stretch"   VerticalAlignment="Stretch" Text="{Binding DomainProduct.Brand}" />

            <StackPanel Grid.Column="2" Grid.Row="0" Grid.RowSpan="2" Orientation="Horizontal"   >
                <Label  FontSize="25"  HorizontalAlignment="Stretch"   VerticalAlignment="Stretch" Content="{Binding DomainProduct.Name}" />
                <Label   FontWeight="Black"  Foreground="DarkBlue" HorizontalAlignment="Stretch"   VerticalAlignment="Center"    Content="价格 "/>
                <Label   FontWeight="Black"  Foreground="DarkBlue" HorizontalAlignment="Stretch"   VerticalAlignment="Center" Content="{Binding Path=SellPrice,Mode=OneWay}"/>
                <Label   FontWeight="Black"  Foreground="DarkBlue" HorizontalAlignment="Stretch"   VerticalAlignment="Center" Content="￥"/>
            </StackPanel>

         </Grid>
    </Border>
</UserControl>
